app.controller("mqParamController", function($scope, $http) {

$scope.config ;

$scope.paramdefault = function(){
        $http({
            method: 'get',
            url: '/mq/getdefault'
         }).success(function(response) {
                if(response.status == '0000'){
                   $scope.config  = response.data;
                }
                if(response.status == '0001'){
                    alert(response.data)
                 }
         });
}

$scope.saveParam  = function(){
    $http({
            method: 'post',
            url: '/mq/save_mq_param',
            data: $scope.config,
            dataType: 'json'
         }).success(function(response) {
                if(response.status == '0000'){
                    alert(response.data);
                }
                if(response.status == '0001'){
                    alert(response.data)
                 }
         });
}


$scope.myConfig  = function(){
    $http({
            method: 'get',
            url: '/mq/getuserconfig'
         }).success(function(response) {
            if(response.status == '0000'){
                $scope.config  = response.data;
            }
            if(response.status == '0001'){
                alert(response.data)
             }
         });
}





});